package com.hyacinth.convert.impl;


import com.hyacinth.convert.AbstractConverter;
import com.hyacinth.utils.BooleanUtil;

/**
 * 波尔转换器
 * @author Looly
 *
 */
public class BooleanConverter extends AbstractConverter<Boolean> {

	@Override
	protected Boolean convertInternal(Object value) {
		if(boolean.class == value.getClass()){
			return (boolean) value;
		}
		String valueStr = convertToStr(value);
		return BooleanUtil.toBoolean(valueStr);
	}

}
